<%@page import="com.dfhc.util.StringHelper"%>
<%@page import="com.dfhc.util.CryptoHelper"%>
<%@ page contentType="text/html; charset=UTF-8" language="java"%>
<!--_meta 作为公共模版分离出去-->
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<link rel="Bookmark" href="/favicon.ico" >
<link rel="Shortcut Icon" href="/favicon.ico" />

<!-- 全局js 和css包 -->
<%@ include file="/jsp/include/web/new/global.jsp" %>
<title>添加团队类型关系规则 </title>

<%@ taglib uri="/dfhc" prefix="dfhc" %>
</head>
<body>


<article class="page-container">











	<form action="" method="post" class="form form-horizontal" id="form-rmpartytyperelationrule-add">
	   <input type="hidden" id="id" name="id" value="${bean.id}">
							
							
	  <dfhc:div templateId="h_ui_div_row_cl">
	    <dfhc:title templateId="h_ui_label_title">团体视图名称：</dfhc:title>	    
	    <dfhc:div templateId="h_ui_div_label_div">	        
			<dfhc:select templateId="h_ui_select" size="1" name="party_view_id" id="party_view_id" pleaseSelect="1" defaultValue="${bean.party_view_id}" sqlOption="sql" columnId="id" columnName="NAME" sql="select id,name from rm_party_view" />			
	    </dfhc:div>	 	    		 
	  </dfhc:div>
	  
	   <dfhc:div templateId="h_ui_div_row_cl">
	    <dfhc:title templateId="h_ui_label_title">父团体类型名称：</dfhc:title>	    
			<dfhc:div templateId="h_ui_div_label_div">
				<dfhc:select templateId="h_ui_select" size="1" name="parent_party_type_id" id="parent_party_type_id" pleaseSelect="1" defaultValue="${bean.parent_party_type_id}" sqlOption="sql" columnId="id" columnName="NAME" sql="select id,name from rm_party_type" />				
			</dfhc:div>
	  </dfhc:div>
							
	   <dfhc:div templateId="h_ui_div_row_cl">
	    <dfhc:title templateId="h_ui_label_title">子团体类型名称：</dfhc:title>	    
	    <dfhc:div templateId="h_ui_div_label_div">	        
			<dfhc:select templateId="h_ui_select" size="1" name="child_party_type_id" id="child_party_type_id" pleaseSelect="1" defaultValue="${bean.child_party_type_id}" sqlOption="sql" columnId="id" columnName="NAME" sql="select id,name from rm_party_type" />			
	    </dfhc:div>	 	    		 
	  </dfhc:div>
	  
	  <dfhc:div templateId="h_ui_div_row_cl">
	   <dfhc:title templateId="h_ui_label_title">规则描述：</dfhc:title>	    
	    <dfhc:div templateId="h_ui_div_label_div">	        
			<dfhc:input templateId="h_ui_input" value="${bean.rule_desc}" placeholder="" id="rule_desc" name="rule_desc"/>			
	    </dfhc:div>	 	    		 
	  </dfhc:div>
							
	    <dfhc:div templateId="h_ui_div_row_cl">
	    <dfhc:title templateId="h_ui_label_title">可新增子团体：</dfhc:title>	    
			<dfhc:div templateId="h_ui_div_label_div">
				<dfhc:select templateId="h_ui_select" size="1" name="is_add_child_party" id="is_add_child_party" pleaseSelect="1" defaultValue="${bean.is_insert_child_party}" sqlOption="code" code="RM_YES_NOT" />				
			</dfhc:div>
	  </dfhc:div>
							
		<dfhc:div templateId="h_ui_div_row_cl">
			<dfhc:div templateId="h_ui_div_pop_up_button">
				<dfhc:button templateId="h_ui_submit_button" />
			</dfhc:div>
		</dfhc:div>
	</form>
</article>



<script type="text/javascript">
$(function(){
	//获取新id
	<c:if test="${empty bean}"> 
	$('#id').val(getNewId('rm_party_type_relation_rule'));
	</c:if>


	$('.skin-minimal input').iCheck({
		checkboxClass: 'icheckbox-blue',
		radioClass: 'iradio-blue',
		increaseArea: '20%'
	});
	
	$("#form-rmpartytyperelationrule-add").validate({
		rules:{
		
		},
 		messages: {
 		
	    },		
		onkeyup:false,
		focusCleanup:true,
		success:"valid",
		submitHandler:function(form){
			<c:if test="${empty bean}"> 
			var url = getRootPath()+'<%=CryptoHelper.encryptUrl(request,"/rmpartytyperelationrule/insert")%>'+'?jsguid='+$('#id').val();
			</c:if>
			<c:if test="${not empty bean}"> 
			var url = getRootPath()+'<%=CryptoHelper.encryptUrl(request,"/rmpartytyperelationrule/update")%>'+'?jsguid='+$('#id').val();
			</c:if>
			//提交成功关闭
			submitAjax(url,$("#form-rmpartytyperelationrule-add").serialize(),getRootPath()+'<%=CryptoHelper.encryptUrl(request,"/rmpartytyperelationrule")%>'); 			    		    		
		}
	});
});
</script> 
<!--/请在上方写此页面业务相关的脚本-->
</body>
</html>
